home *** CD-ROM | disk | FTP | other *** search
/ No Fragments Archive 12: Textmags & Docs / nf_archive_12.iso / MAGS / SOURCES / ATARI_SRC.ZIP / atari source / TOS_SRC / CONTROL.STE / OBDEFS.H < prev    next >
Encoding:
C/C++ Source or Header  |  2001-02-10  |  4.5 KB  |  203 lines

  1. /************************************************************************/
  2. /*    OBDEFS.H Common OBJECT definitions and structures.        */
  3. /*        Copyright 1985 Atari Corp.                */
  4. /************************************************************************/
  5.  
  6. #define ROOT 0
  7.                         /* max string length    */
  8. #define MAX_LEN 81
  9.                     /* max depth of search or draw    */
  10. #define MAX_DEPTH 8
  11.                         /* inside patterns    */
  12. #define IP_HOLLOW 0
  13. #define IP_1PATT 1
  14. #define IP_2PATT 2
  15. #define IP_3PATT 3
  16. #define IP_4PATT 4
  17. #define IP_5PATT 5
  18. #define IP_6PATT 6
  19. #define IP_SOLID 7
  20.                         /* gsx modes        */
  21. #define MD_REPLACE 1
  22. #define MD_TRANS   2
  23. #define MD_XOR     3
  24. #define MD_ERASE   4
  25.                         /* bit blt rules    */
  26. #define ALL_WHITE  0
  27. #define S_AND_D    1
  28. #define    S_AND_NOTD 2
  29. #define S_ONLY     3
  30. #define NOTS_AND_D 4
  31. #define    D_ONLY     5
  32. #define S_XOR_D    6
  33. #define S_OR_D     7
  34. #define    NOT_SORD   8
  35. #define    NOT_SXORD  9
  36. #define D_INVERT  10
  37. #define    NOT_D     11
  38. #define    S_OR_NOTD 12
  39. #define NOTS_OR_D 13
  40. #define    NOT_SANDD 14
  41. #define ALL_BLACK 15
  42.                         /* font types        */
  43. #define IBM 3
  44. #define SMALL 5
  45.                         /* Graphic types of obs    */
  46. #define G_BOX     20
  47. #define G_TEXT    21
  48. #define G_BOXTEXT 22
  49. #define G_IMAGE   23
  50. #define G_USERDEF 24
  51. #define G_IBOX    25
  52. #define G_BUTTON  26
  53. #define G_BOXCHAR 27
  54. #define G_STRING  28
  55. #define G_FTEXT   29
  56. #define G_FBOXTEXT 30
  57. #define G_ICON    31
  58. #define G_TITLE   32
  59.                         /* Object flags         */
  60. #define NONE       0x0
  61. #define SELECTABLE 0x1
  62. #define DEFAULT    0x2
  63. #define EXIT       0x4
  64. #define EDITABLE   0x8
  65. #define RBUTTON   0x10
  66. #define LASTOB    0x20
  67. #define TOUCHEXIT 0x40
  68. #define HIDETREE  0x80
  69. #define INDIRECT 0x100
  70.                         /* Object states    */
  71. #define NORMAL    0x0
  72. #define SELECTED  0x1
  73. #define CROSSED   0x2
  74. #define CHECKED   0x4
  75. #define DISABLED  0x8
  76. #define OUTLINED 0x10
  77. #define SHADOWED 0x20
  78.                         /* Object colors    */
  79. #define WHITE    0
  80. #define BLACK    1
  81. #define RED      2
  82. #define GREEN    3
  83. #define BLUE     4
  84. #define CYAN     5
  85. #define YELLOW   6
  86. #define MAGENTA  7
  87. #define LWHITE   8
  88. #define LBLACK   9
  89. #define LRED     10
  90. #define LGREEN   11
  91. #define LBLUE    12
  92. #define LCYAN    13
  93. #define LYELLOW  14
  94. #define LMAGENTA 15
  95.                     /* editable text field definitions */
  96. #define EDSTART 0
  97. #define EDINIT  1
  98. #define EDCHAR  2
  99. #define EDEND   3
  100.                     /* editable text justification      */
  101. #define TE_LEFT  0
  102. #define TE_RIGHT 1
  103. #define TE_CNTR  2
  104.  
  105. /*    Structure Definitions */
  106.  
  107. typedef struct object
  108. {
  109.     int        ob_next;    /* -> object's next sibling    */
  110.     int        ob_head;    /* -> head of object's children */
  111.     int        ob_tail;    /* -> tail of object's children */
  112.     unsigned int    ob_type;    /* type of object- BOX, CHAR,...*/
  113.     unsigned int    ob_flags;    /* flags            */
  114.     unsigned int    ob_state;    /* state- SELECTED, OPEN, ...    */
  115.     long        ob_spec;    /* "out"- -> anything else    */
  116.     int        ob_x;        /* upper left corner of object    */
  117.     int        ob_y;        /* upper left corner of object    */
  118.     int        ob_width;    /* width of obj            */
  119.     int        ob_height;    /* height of obj        */
  120. } OBJECT;
  121.  
  122.  
  123. typedef struct orect
  124. {
  125. struct orect    *o_link;
  126.     int    o_x;
  127.     int    o_y;
  128.     int    o_w;
  129.     int    o_h;
  130. } ORECT;
  131.  
  132.  
  133. typedef struct grect
  134. {
  135.     int    g_x;
  136.     int    g_y;
  137.     int    g_w;
  138.     int    g_h;
  139. } GRECT;
  140.  
  141.  
  142. typedef struct text_edinfo
  143. {
  144.     long        te_ptext;    /* ptr to text (must be 1st)    */
  145.     long        te_ptmplt;    /* ptr to template        */
  146.     long        te_pvalid;    /* ptr to validation chrs.    */
  147.     int        te_font;    /* font                */
  148.     int        te_junk1;    /* junk word            */
  149.     int        te_just;    /* justification- left, right...*/
  150.     int        te_color;    /* color information word    */
  151.     int        te_junk2;    /* junk word            */
  152.     int        te_thickness;    /* border thickness        */
  153.     int        te_txtlen;    /* length of text string    */
  154.     int        te_tmplen;    /* length of template string    */
  155. } TEDINFO;
  156.  
  157.  
  158. typedef struct icon_block
  159. {
  160.     long    ib_pmask;
  161.     long    ib_pdata;
  162.     long    ib_ptext;
  163.     int    ib_char;
  164.     int    ib_xchar;
  165.     int    ib_ychar;
  166.     int    ib_xicon;
  167.     int    ib_yicon;
  168.     int    ib_wicon;
  169.     int    ib_hicon;
  170.     int    ib_xtext;
  171.     int    ib_ytext;
  172.     int    ib_wtext;
  173.     int    ib_htext;
  174. } ICONBLK;
  175.  
  176. typedef struct bit_block
  177. {
  178.     long    bi_pdata;        /* ptr to bit forms data    */
  179.     int    bi_wb;            /* width of form in bytes    */
  180.     int    bi_hl;            /* height in lines        */
  181.     int    bi_x;            /* source x in bit form        */
  182.     int    bi_y;            /* source y in bit form        */
  183.     int    bi_color;        /* fg color of blt         */
  184. } BITBLK;
  185.  
  186. typedef struct user_blk
  187. {
  188.     long    ub_code;
  189.     long    ub_parm;
  190. } USERBLK;
  191.  
  192. typedef struct parm_blk
  193. {
  194.     long    pb_tree;
  195.     int    pb_obj;
  196.     int    pb_prevstate;
  197.     int    pb_currstate;
  198.     int    pb_x, pb_y, pb_w, pb_h;
  199.     int    pb_xc, pb_yc, pb_wc, pb_hc;
  200.     long    pb_parm;
  201. } PARMBLK;
  202.  
  203.